
Using Yak with Newtonscript


		The NTK package provided here demonstrates how to use Yak in your own applications.  Simply create a slot during the execution of your base view's ViewSetupFormScript which points to the Yak application;  open Yak from here as well.  Now it may be called from anywhere in your app simply by pointer:dosentence(string)  or pointer:speakarray(array).  The dosentence() method accepts any text string and is pretty straightforward.  If you need a little more control over the speech, however, you may use speakarray, which is described below.

		Speakarray accepts an array of integers * with a terminating 99 value * .   The following is a list of the phonetic symbols and their matching integers values (some values are repeated.  it doesn't matter which you use):

	0 - AE		 	15 - p	 			30 - D
	1 - b			 	16 - k				 31 - AY
  2 - k			 	17 - r				 32 - IX
  3 - d			 	18 - s	 			33 - UW
  4 - EH			19 - t				  34 - UH
  5 - f		 		20 - UX		  35 - OW
  6 - g		 	 21 - v 	 		 36 - AW
  7 - h		 	 22 - w 			 37 - OY
  8 - IH		  23 - k 	 		 38 - C
  9 - j				 24 - y 			  39 - NG
  10 - k			25 - z			 	 40 - SH
  11 - l			 26 - EY	 	  41 - TH
  12 - m		 27 - AO	
  13 - n			28 - AX	
  14 - AA 	29 - IY 
  		

	Be sure to include a terminating 99 value at the end of the array!! 

  ex.  yakapp:speakarray( [ 7,4,11,35,99 ] );

    = "hello"  
 
  
	That's about all there is to it.  Don't forget to close Yak in your app's ViewSetupDoneScript.  By the way, there are a bunch of other methods in the Yak base view.  You don't want to mess with these!
They'll offer no more functionality than the two functions described above, but are more picky and likely to crash if not used exactly as intended.

	Yak builds words (sound frames) in heap memory one at a time and then disposes each word before creating the next.  If you are experiencing tight heap space limitations, you can break really long words down into shorter chunks and this might fix the problem.   As a last resort, you will just have to use the 5 kHz voice which sounds like someone (with a speech impediment) talking over an old AM radio.

